package cn.iocoder.yudao.module.search.api.search.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.util.List;
import java.util.Map;

/**
 * RPC 服务 - 搜索查询 Response DTO
 *
 * @author 芋道源码
 */
@Schema(description = "RPC 服务 - 搜索查询 Response DTO")
@Data
public class SearchQueryRespDTO {

    @Schema(description = "总命中数", example = "100")
    private Long total;

    @Schema(description = "最大评分", example = "1.5")
    private Double maxScore;

    @Schema(description = "搜索结果")
    private List<SearchDocumentRespDTO> documents;

    @Schema(description = "聚合结果", example = "{\"age_stats\":{\"count\":100,\"min\":18,\"max\":65}}")
    private Map<String, Object> aggregations;

    @Schema(description = "查询耗时(毫秒)", example = "15")
    private Long took;

}
